package com.example.idie.controller;

import com.example.idie.bean.Response;
import com.example.idie.service.InfoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;

@Controller
public class InfoController {
    @Resource
    InfoService infoService;

    @CrossOrigin
    @GetMapping(value = "/info/model")
    @ResponseBody
    public Response getModelInfo() {
        Response<String> modelInfos = infoService.getModelInfos();

        return modelInfos;
    }

    @CrossOrigin
    @GetMapping(value = "/info/dataset")
    @ResponseBody
    public Response getDatasetInfo() {
        Response<String> datasetInfos = infoService.getDatasetInfos();

        return datasetInfos;
    }

}
